import config from '../../config/index';
import axiosInstance from '../../utils/request'

const testApi = {
  getGithubUser: keyword => {
    console.log(config.API_PROXY_STR);
    return axiosInstance({
        // url: 'https://api.github.com' + '/search/users',
        // url: '/search/users',
        url: config.API_PROXY_STR + '/search/users',
        method: 'get',
        params: {q: keyword}
    })
  },
  getToken: (data) => {
    return axiosInstance({
      url: `/yhgl/login/token`,
      method: 'post',
      data
    })
  },
}

export default testApi
